package com.example.bookmanage.domain.book;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.Date;

import com.example.bookmanage.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @TableName book_db
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="book_db")
@Data
public class Book extends BaseEntity {
    @TableId(value = "book_id", type = IdType.ASSIGN_ID)
    private Long bookId;

    private String bookName;

    private String author;

    private String press;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate pressDate;

    private Double price;

    private Long stock;
}
